package io.github.wjehovah.yyn;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

import com.ixintui.pushsdk.PushSdkApi;


public class SplashActivity extends Activity{

    int appKey = 1892020017;

    private Handler handler=new Handler(){
        @Override
        public void handleMessage(Message msg) {
            startActivity(new Intent(getApplicationContext(),HomeGroup.class));
            finish();
        }
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
        handler.sendEmptyMessageDelayed(1, 2000);
        PushSdkApi.register(this, appKey, "yingchen", "1.0");
    }

    @Override
    protected void onDestroy() {
        handler.removeCallbacksAndMessages(null);
        super.onDestroy();
    }
}
